{% set uniqid = uniqid ?? uniqid('database_') %}
{% set idBase = "sqlite-databases-#{uniqid}" %}
{% set nameBase = "sqlite[databases][#{uniqid}]" %}

<div id="{{ idBase }}" data-uniqid="{{ uniqid }}" data-name="{{ nameBase }}"
     class="tab-pane {{ active is defined and active ? 'active' }}">
    <div class="form-group col-xs-12 col-sm-6">
        <label for="{{ idBase }}-name">
            DB Name
        </label>
        <input type="text" id="{{ idBase }}-name"
               name="{{ nameBase }}[name]"
               placeholder="database_name" class="form-control"
               value="{{ database.name }}" />
    </div>

    <div class="form-group col-xs-12 col-sm-6">
        <label for="{{ idBase }}-owner">
            Owner
        </label>
        <input type="text" id="{{ idBase }}-owner"
               name="{{ nameBase }}[owner]"
               placeholder="owner" class="form-control"
               value="{{ database.owner }}" />
        <div class="help-block">
            Provide the user that will be the database owner.
            The user must be a valid unix user such as <code>www-data</code>.
        </div>
    </div>

    <div class="clearfix"></div>

    <div class="form-group col-xs-12 col-sm-6">
        <label for="{{ idBase }}-group">
            Group
        </label>
        <input type="text" id="{{ idBase }}-group"
               name="{{ nameBase }}[group]"
               placeholder="group" class="form-control"
               value="{{ database.group }}" />
        <div class="help-block">
            Provide a valid unix group for the database.
        </div>
    </div>

    <div class="form-group col-xs-12 col-sm-6">
        <label for="{{ idBase }}-sql_file">
            Import Database From File
        </label>
        <input type="text" id="{{ idBase }}-sql_file"
               name="{{ nameBase }}[sql_file]"
               placeholder="/var/www/sql/database_name.sql" class="form-control"
               value="{{ database.sql_file }}" />
        <div class="help-block">
            Optional. Make sure this file is inside the VM before running
            <code>$ vagrant up</code>.
        </div>
    </div>

    <div class="clearfix"></div>
</div>
